<%@ page language="java" import="java.util.*, java.text.*,com.zjut.zs.util.tools.*,com.zjut.an.util.tools.*,com.zjut.an.util.system.*,com.zjut.an.config.manager.*,
com.zjut.zs.applyview.dao.*,com.zjut.zs.applyview.manager.*,com.zjut.zs.userstatus.dao.*" pageEncoding="utf-8"%>
<%@ page import="com.zjut.zs.applyview.dao.ZsApplyView" %>
<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>三位一体综合评价招生报名系统</title>
    <script src="css/tailwindcss.css"></script>
    <script src="js/anime.min.js"></script>
    <link href="css/css2.css" rel="stylesheet">
    <link href="css/icon.css" rel="stylesheet">
    <link rel="stylesheet" href="css/iconfont/iconfont.css">
    <style>
        * {
            font-family: 'Inter', sans-serif;
        }
        .gradient-header { background: linear-gradient(90deg, #1e3a8a 0%, #3b82f6 50%, #60a5fa 100%); }
        .tab-active {
            background-color: #3b82f6;
            color: white;
            border-radius: 9999px;
        }
        .tab-inactive {
            color: #4b5563;
        }
        .tab-inactive:hover {
            color: #3b82f6;
        }
        iframe {
            transition: all 0.3s ease;
        }
        .footer {
            background-color: #1e40af;
        }
        .info-bar {
            background-color: #eff6ff;
        }
        .icon-active {
            color: #19ce00;
        }
    </style>
</head>
<%
    AnConfigManager anconfig = (AnConfigManager) SpringContextUtil.getBean("AnConfigManager");
    ZsApplyViewManager amanager = (ZsApplyViewManager) SpringContextUtil.getBean("ZsApplyViewManager");
    String nav = anconfig.getSingleConfigInfoByName("普通生导航菜单");
    ZsApplyView zsApplyView = new ZsApplyView();
    if(session.getAttribute("zsUserStatus") != null) {
        ZsUserStatus zsUserStatus = (ZsUserStatus) session.getAttribute("zsUserStatus");
        zsApplyView = amanager.getData(zsUserStatus.getZsUser().getUsId());
        if("特长生".equals(zsApplyView.getScColumn1())) {
            nav = anconfig.getSingleConfigInfoByName("特长生导航菜单");
        }
        System.out.println(session.getAttribute("zsUserStatus"));
        System.out.println(zsApplyView.getScColumn1());
    }
    System.out.println(nav);
    System.out.println(nav.contains("材料上传"));

    //nav = anconfig.getSingleConfigInfoByName("特长生导航菜单");
    //System.out.println(nav);
    //System.out.println(nav.contains("材料上传"));
%>
<body class="flex flex-col min-h-screen bg-gray-50">
    <!-- 头部区域 -->
    <header class="gradient-header text-white">
        <!-- 主头部 -->
        <div class="gradient-bg text-white">
            <div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
                <div class="flex justify-between items-center py-6">
                    <!-- 左侧Logo和系统名称 -->
                    <div class="flex items-center space-x-4">
                        <div class="w-12 h-12 bg-white bg-opacity-20 rounded-lg flex items-center justify-center">
                            <svg class="w-8 h-8 text-white" fill="currentColor" viewBox="0 0 20 20">
                                <path d="M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z"/>
                            </svg>
                        </div>
                        <div>
                            <h1 class="serif text-2xl font-bold">三位一体综合评价招生报名系统</h1>
                            <p class="text-blue-100 text-sm">Trinity Comprehensive Evaluation Admissions System</p>
                        </div>
                    </div>

                    <!-- 右侧用户操作按钮 -->
                    <%if(session.getAttribute("zsUser") == null){%>
                    <div class="flex items-center space-x-4">

                    </div>
                    <%}else{%>
                    <div class="flex items-center space-x-4">
                        <a href="zs_user.jsp" class="tab-button bg-white bg-opacity-20 hover:bg-opacity-30 px-6 py-2 rounded-lg font-medium transition-all duration-300 transform hover:scale-105 text-white">
                            <span class="icon iconfont icon-people">个人信息</span>
                        </a>
                        <a href="zs_logout.jsp" class="tab-button bg-white bg-opacity-20 hover:bg-opacity-30 px-6 py-2 rounded-lg font-medium transition-all duration-300 transform hover:scale-105 text-white">
                            <span class="icon iconfont icon-logout">注销</span>
                        </a>
                    </div>
                    <%}%>
                </div>
            </div>
        </div>

        <!-- 信息栏 -->
        <div class="bg-white border-b border-gray-200">
            <div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
                <div class="flex justify-between items-center py-3">
                    <!-- 左侧报名截止时间 -->
                    <div class="flex items-center space-x-2">
                        <svg class="w-5 h-5 text-red-500" fill="currentColor" viewBox="0 0 20 20">
                            <path fill-rule="evenodd" d="M10 18a8 8 0 100-16 8 8 0 000 16zm1-12a1 1 0 10-2 0v4a1 1 0 00.293.707l2.828 2.829a1 1 0 101.415-1.415L11 9.586V6z" clip-rule="evenodd"/>
                        </svg>
                        <span class="text-gray-700 font-medium"><%out.print(anconfig.getSingleConfigInfoByName("报名时间"));%></span>
                    </div>

                    <!-- 右侧咨询信息 -->
                    <div class="flex items-center space-x-6">
                        <div class="flex items-center space-x-2">
                            <svg class="w-5 h-5 text-blue-600" fill="currentColor" viewBox="0 0 20 20">
                                <path d="M2 3a1 1 0 011-1h2.153a1 1 0 01.986.836l.74 4.435a1 1 0 01-.54 1.06l-1.548.773a11.037 11.037 0 006.105 6.105l.774-1.548a1 1 0 011.059-.54l4.435.74a1 1 0 01.836.986V17a1 1 0 01-1 1h-2C7.82 18 2 12.18 2 5V3z"/>
                            </svg>
                            <%=anconfig.getSingleConfigInfoByName("联系方式")%>
                        </div>
                    </div>
                </div>
            </div>
        </div>

    </header>
    <!-- 标签导航区域 -->
    <nav class="bg-white shadow-lg sticky top-0 z-40">
        <div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
            <div class="flex w-full justify-center">
                <div class="flex space-x-1 py-2">
                    <a href="default.jsp" data-tab="default" class="tab-button px-3 py-2 font-medium transition-all tab-active flex items-center">首页</a>

                    <span class="icon iconfont icon-right flex items-center"></span>
                    <a href="zs_newsclass.jsp" data-tab="news" class="tab-button px-3 py-2 font-medium transition-all tab-inactive">公告通知</a>
                    <%if(nav.contains("考生信息")){%>
                        <span class="icon iconfont icon-right flex items-center"></span>
                        <a href="<%=anconfig.getSingleConfigInfoByName("考生信息查看页面") %>" data-tab="exvalue" class="tab-button px-3 py-2 font-medium transition-all tab-inactive"><span class="icon iconfont <%out.println(null!=zsApplyView.getUsName() ? "icon-roundcheckfill icon-active" : "icon-round");%>">考生信息</span></a>
                    <%}%>
                    <%if(nav.contains("补充填写")){%>
                        <span class="icon iconfont icon-right flex items-center"></span>
                        <a href="<%=anconfig.getSingleConfigInfoByName("补充填写页面") %>" data-tab="exvalue" class="tab-button px-3 py-2 font-medium transition-all tab-inactive"><span class="icon iconfont <%out.println(null!=zsApplyView.getScColumn1() ? "icon-roundcheckfill icon-active" : "icon-round");%>">补充填写</span></a>
                    <%}%>
                    <%if(nav.contains("获奖填写")){%>
                        <span class="icon iconfont icon-right flex items-center"></span>
                        <a href="<%=anconfig.getSingleConfigInfoByName("获奖填写页面") %>" data-tab="zxlb" class="tab-button px-3 py-2 font-medium transition-all tab-inactive"><span class="icon iconfont <%out.println(null!=zsApplyView.getZsZxlb() ? "icon-roundcheckfill icon-active" : "icon-round");%>">获奖填写</span></a>
                    <%}%>
                    <%if(nav.contains("材料上传")){%>
                        <span class="icon iconfont icon-right flex items-center"></span>
                        <a href="<%=anconfig.getSingleConfigInfoByName("材料上传页面")%>" data-tab="filesend" class="tab-button px-3 py-2 font-medium transition-all tab-inactive"><span class="icon iconfont <%out.println(Status.FILESTATUS_YES.getStatus().equals(zsApplyView.getFileStatus()) ? "icon-roundcheckfill icon-active" : "icon-round");%>">材料上传</span></a>
                    <%}%>
                    <%if(nav.contains("确认提交")){%>
                        <span class="icon iconfont icon-right flex items-center"></span>
                        <a href="<%=anconfig.getSingleConfigInfoByName("确认提交页面")%>" data-tab="send" class="tab-button px-3 py-2 font-medium transition-all tab-inactive"><span class="icon iconfont <%out.println(Status.APPSTATUS_YES.getStatus().equals(zsApplyView.getAppStatus()) ? "icon-roundcheckfill icon-active" : "icon-round");%>">确认提交</span></a>
                    <%}%>
                    <%if(nav.contains("缴费")){%>
                        <span class="icon iconfont icon-right flex items-center"></span>
                        <a href="<%=anconfig.getSingleConfigInfoByName("网上缴费页面")%>" data-tab="pay" class="tab-button px-3 py-2 font-medium transition-all tab-inactive"><span class="icon iconfont <%out.println(Status.PAYSTATUS_YES.getStatus().equals(zsApplyView.getPayStatus()) ? "icon-roundcheckfill icon-active" : "icon-round");%>">缴费</span></a>
                    <%}%>
                    <%if(nav.contains("打印通知单")){%>
                        <span class="icon iconfont icon-right flex items-center"></span>
                        <a href="<%=anconfig.getSingleConfigInfoByName("打印通知单页面")%>" data-tab="examprint" class="tab-button px-3 py-2 font-medium transition-all tab-inactive"><span class="icon iconfont <%out.println(Status.PRINTSTATUS_YES.getStatus().equals(zsApplyView.getPrintStatus()) ? "icon-roundcheckfill icon-active" : "icon-round");%>">打印通知单</span></a>
                    <%}%>
                    <%if(nav.contains("打印准考证")){%>
                        <span class="icon iconfont icon-right flex items-center"></span>
                        <a href="<%=anconfig.getSingleConfigInfoByName("打印准考证页面")%>" data-tab="examprint" class="tab-button px-3 py-2 font-medium transition-all tab-inactive"><span class="icon iconfont <%out.println(Status.PRINTSTATUS_YES.getStatus().equals(zsApplyView.getPrintStatus()) ? "icon-roundcheckfill icon-active" : "icon-round");%>">打印准考证</span></a>
                    <%}%>
                    <%if(nav.contains("进度查询")){%>
                        <span class="icon iconfont icon-right flex items-center"></span>
                        <a href="zs_status.jsp" data-tab="status" class="tab-button px-3 py-2 font-medium transition-all tab-inactive">进度查询</a>
                    <%}%>
                </div>
            </div>
        </div>
    </nav>
    <!-- 主内容区域 -->
    <main class="flex-1 container mx-auto px-4 py-6" style="max-width: 1200px;">
        <div class="bg-white rounded-xl shadow-md overflow-hidden">
            <iframe id="contentFrame" src="default.jsp" class="w-full min-h-[600px]" frameborder="0"></iframe>
        </div>
    </main>

    <!-- 底部区域 -->
    <footer class="footer text-white py-6">
        <div class="container mx-auto px-4 text-center">
            <p>&copy; 2025 三位一体综合评价招生报名系统. 版权所有.</p>
            <p class="mt-2 text-blue-200">技术支持: 信息技术中心 | 服务电话: 400-123-4567</p>
        </div>
    </footer>

    <script>
        document.addEventListener('DOMContentLoaded', function() {
            const tabButtons = document.querySelectorAll('.tab-button');
            const contentFrame = document.getElementById('contentFrame');

            // 为每个导航标签添加点击事件
            tabButtons.forEach(button => {
                button.addEventListener('click', function(e) {
                    e.preventDefault();

                    // 移除所有标签的active类
                    tabButtons.forEach(btn => {
                        btn.classList.remove('tab-active');
                        btn.classList.add('tab-inactive');
                    });

                    // 为当前点击的标签添加active类
                    this.classList.remove('tab-inactive');
                    this.classList.add('tab-active');

                    // 更新iframe的src
                    const page = this.getAttribute('href');
                    contentFrame.src = page;

                    // 添加点击动画效果
                    anime({
                        targets: this,
                        scale: [1, 1.1, 1],
                        duration: 300,
                        easing: 'easeInOutQuad'
                    });
                });
            });

            // 动态调整iframe高度
            function adjustIframeHeight() {
                try {
                    const iframeDoc = contentFrame.contentDocument || contentFrame.contentWindow.document;
                    const iframeBody = iframeDoc.body;
                    const height = Math.max(iframeBody.scrollHeight, iframeBody.offsetHeight);
                    contentFrame.style.height = height + 'px';

                    // 确保iframe内容不会溢出
                    contentFrame.style.overflow = 'hidden';
                } catch (e) {
                    console.log('无法访问iframe内容:', e);
                }
            }

            // 监听iframe加载完成事件
            contentFrame.addEventListener('load', adjustIframeHeight);

            // 初始调整高度
            setTimeout(adjustIframeHeight, 500);
        });
    </script>
</body>
</html>